# Copyright 2018- The Pixie Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

load("@io_bazel_rules_docker//java:image.bzl", "java_image")
load("@rules_java//java:defs.bzl", "java_binary")

package(default_visibility = ["//src/stirling:__subpackages__"])

# These targets are binaries that send requests to the host DNS resolution with different sites.
# Intended for use in tests, where we want to trace the DNS queries.
# Intentionally chose Java to demonstrate that Java also uses libc's getaddrinfo() function.

java_binary(
    name = "dns_hammer",
    srcs = ["DNSHammer.java"],
    main_class = "DNSHammer",
)

java_image(
    name = "dns_hammer_image",
    srcs = ["DNSHammer.java"],
    main_class = "DNSHammer",
)
